package com.icw.resource.inner.properties;

import java.util.Map;

import com.icw.basis.PropertySettings;
import com.icw.resource.inner.entity.IcwFile;
import com.icw.utility.IcwUtils;
import com.icw.utility.query.IcwCriterion;

public class Ps4IcwFile extends PropertySettings<IcwFile> {

	@Override
	public String[] nameProperties() {
		return new String[] { "name" };
	}

	@Override
	public String[] keyProperties() {
		return new String[] { "name" };
	}

	@Override
	public String[] listProperties() {
		return new String[] { "name", "createTime" };
	}

	@Override
	public String[] editProperties() {
		return null;
	}

	@Override
	public String[] addProperties() {
		return null;
	}

	@Override
	public String[] criteriaProperties() {
		return null;
	}

	@Override
	public String[] listLabels() {
		return null;
	}

	@Override
	public Integer[] listIndexes() {
		return null;
	}

	@Override
	public String[] editLabels() {
		return null;
	}

	@Override
	public Integer[] editIndexes() {
		return null;
	}

	@Override
	public String[] addLabels() {
		return null;
	}

	@Override
	public Integer[] addIndexes() {
		return null;
	}

	@Override
	public String[] criteriaLabels() {
		return null;
	}

	@Override
	public Integer[] criteriaIndexes() {
		return null;
	}

	@Override
	public void permSettings(Map<String, Map<String, Object>> perm_map) {
		super.permSettings(perm_map);
		perm_map.put("getlist", IcwUtils.mapObject("criteria.criterions[?]", new IcwCriterion("eq", "user.id", "{{user.id}}")));
		perm_map.put("post", IcwUtils.mapObject(null, null// e
				, "user.id", "{{user.id}}"// e
				, "size", IcwUtils.mapObject(null, null// e
						, "methodName", "com.icw.decoupling.defi.tool.BinaryDataManager.sizeOf"// e
						, "args", new Object[] { "{{params.location}}" })// e
		));
	}

	@Override
	public String[] publicActions() {
		return new String[] { "getone" };
	}
}
